package com.test.demo.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author Gao
 * @date 2020/8/24
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = "object-topic", consumerGroup = "test-consumer_object-topic")
    public class SyncConsumer2 implements RocketMQListener<Object> {

    @Override
    public void onMessage(Object object) {
        log.info("SyncConsumer2 消费端接收到消息:{}", object);
    }
}
